home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Visual Basic new SourceCode and Projects / Barcode Generator 2.0 / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-06-24  |  4.1 KB  |  108 lines

  1. VERSION 5.00
  2. Begin VB.Form BarCodefrm 
  3.    AutoRedraw      =   -1  'True
  4.    BackColor       =   &H00FFFFFF&
  5.    BorderStyle     =   3  'Fester Dialog
  6.    Caption         =   "BCode -1-"
  7.    ClientHeight    =   510
  8.    ClientLeft      =   45
  9.    ClientTop       =   330
  10.    ClientWidth     =   1665
  11.    Icon            =   "Form1.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MaxButton       =   0   'False
  15.    MDIChild        =   -1  'True
  16.    ScaleHeight     =   34
  17.    ScaleMode       =   3  'Pixel
  18.    ScaleWidth      =   111
  19.    ShowInTaskbar   =   0   'False
  20.    Begin VB.Label Label3 
  21.       AutoSize        =   -1  'True
  22.       BackStyle       =   0  'Transparent
  23.       Caption         =   "123456"
  24.       Height          =   195
  25.       Left            =   960
  26.       TabIndex        =   2
  27.       Top             =   300
  28.       Width           =   540
  29.    End
  30.    Begin VB.Label Label2 
  31.       AutoSize        =   -1  'True
  32.       BackStyle       =   0  'Transparent
  33.       Caption         =   "123456"
  34.       Height          =   195
  35.       Left            =   240
  36.       TabIndex        =   1
  37.       Top             =   300
  38.       Width           =   540
  39.    End
  40.    Begin VB.Label Label1 
  41.       AutoSize        =   -1  'True
  42.       BackStyle       =   0  'Transparent
  43.       Caption         =   "6"
  44.       Height          =   195
  45.       Left            =   0
  46.       TabIndex        =   0
  47.       Top             =   300
  48.       Width           =   90
  49.    End
  50. Attribute VB_Name = "BarCodefrm"
  51. Attribute VB_GlobalNameSpace = False
  52. Attribute VB_Creatable = False
  53. Attribute VB_PredeclaredId = True
  54. Attribute VB_Exposed = False
  55. Public isEAN As Boolean
  56. Private Sub Form_DblClick()
  57. Mainfrm.ActiveForm.Width = InputBox("Set a new width", "New Width", Mainfrm.ActiveForm.Width)
  58. End Sub
  59. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  60. If Mainfrm.ActiveForm.isEAN = True Then
  61. If KeyCode = vbKeyAdd Then
  62.     Mainfrm.Text1.text = Add(Mainfrm.Text1.text)
  63.     Mainfrm.ActiveForm.Width = (options.Text1.text)
  64.     Mainfrm.ActiveForm.Cls
  65.     Mainfrm.ActiveForm.ScaleMode = 3
  66.     Mainfrm.ActiveForm.Label1.Visible = True
  67.     PaintCode Mainfrm.ActiveForm, Mid$(Mainfrm.Text1.text, 1, 1), Mid$(Mainfrm.Text1.text, 2, 6), Mid$(Mainfrm.Text1.text, 8, 6)
  68.     Mainfrm.ActiveForm.Label1.Caption = Mid$(Mainfrm.Text1.text, 1, 1)
  69.     Mainfrm.ActiveForm.Label2.Caption = Mid$(Mainfrm.Text1.text, 2, 6)
  70.     Mainfrm.ActiveForm.Label3.Caption = Mid$(Mainfrm.Text1.text, 8, 6)
  71.     Mainfrm.ActiveForm.isEAN = True
  72.     Mainfrm.ActiveForm.Refresh
  73. ElseIf KeyCode = vbKeySubtract Then
  74.     Mainfrm.Text1.text = Subt(Mainfrm.Text1.text)
  75.     Mainfrm.ActiveForm.Width = (options.Text1.text)
  76.     Mainfrm.ActiveForm.Cls
  77.     Mainfrm.ActiveForm.ScaleMode = 3
  78.     Mainfrm.ActiveForm.Label1.Visible = True
  79.     PaintCode Mainfrm.ActiveForm, Mid$(Mainfrm.Text1.text, 1, 1), Mid$(Mainfrm.Text1.text, 2, 6), Mid$(Mainfrm.Text1.text, 8, 6)
  80.     Mainfrm.ActiveForm.Label1.Caption = Mid$(Mainfrm.Text1.text, 1, 1)
  81.     Mainfrm.ActiveForm.Label2.Caption = Mid$(Mainfrm.Text1.text, 2, 6)
  82.     Mainfrm.ActiveForm.Label3.Caption = Mid$(Mainfrm.Text1.text, 8, 6)
  83.     Mainfrm.ActiveForm.isEAN = True
  84.     Mainfrm.ActiveForm.Refresh
  85. ElseIf KeyCode = vbKeyReturn Then
  86.     newBarCode
  87.     Mainfrm.ActiveForm.Width = (options.Text1.text)
  88.     Mainfrm.ActiveForm.Cls
  89.     Mainfrm.ActiveForm.ScaleMode = 3
  90.     Mainfrm.ActiveForm.Label1.Visible = True
  91.     PaintCode Mainfrm.ActiveForm, Mid$(Mainfrm.Text1.text, 1, 1), Mid$(Mainfrm.Text1.text, 2, 6), Mid$(Mainfrm.Text1.text, 8, 6)
  92.     Mainfrm.ActiveForm.Label1.Caption = Mid$(Mainfrm.Text1.text, 1, 1)
  93.     Mainfrm.ActiveForm.Label2.Caption = Mid$(Mainfrm.Text1.text, 2, 6)
  94.     Mainfrm.ActiveForm.Label3.Caption = Mid$(Mainfrm.Text1.text, 8, 6)
  95.     Mainfrm.ActiveForm.isEAN = True
  96.     Mainfrm.ActiveForm.Refresh
  97. End If
  98. End If
  99. End Sub
  100. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  101. If Button = 2 Then
  102.     Me.PopupMenu menues.C, , X, Y
  103. End If
  104. End Sub
  105. Private Sub Form_Unload(Cancel As Integer)
  106. FState(Me.Tag).Deleted = True
  107. End Sub
  108.